function y = qf2(x)
%A Quadratic Function QF2  
%x0=[0.5, 0.5, ...,0.5].  
%fmin=n/2
%Author:shi yangyang
n=length(x);
y=ones(1,n);
for i=1:1:n
    y(i)=i*((x(i)*x(i)-1)^2);
end
y=0.5*sum(y)-x(n);
